package ru.osu.acm.testing.solutions;

import java.io.*;
import java.util.*;
import java.math.BigInteger;

/**
 * User: Aleksey
 * Date: 16.01.2009
 * Time: 1:51:36
 */
public class Task13 implements Runnable {
    private static BufferedReader br = null;
    private static PrintWriter pw = null;
    private static StringTokenizer st = new StringTokenizer("");

    private void nline() {
        try {
            st = new StringTokenizer(br.readLine());
        }
        catch (IOException e) {
            throw new RuntimeException("RuntimeException");
        }
    }

    private int ni() {
        while (!st.hasMoreTokens()) nline();
        return Integer.parseInt(st.nextToken());
    }

    private long nl() {
        while (!st.hasMoreTokens()) nline();
        return Long.parseLong(st.nextToken());
    }

    private double nd() {
        while (!st.hasMoreTokens()) nline();
        return Double.parseDouble(st.nextToken());
    }

    private String ns() {
        while (!st.hasMoreTokens()) nline();
        return st.nextToken();
    }

    int n;
    boolean[][] m;
    double[] x;
    double[] y;

    class Neighbour implements Comparable<Neighbour> {
        int index;
        double x;
        double y;
        Double alpha;

        public int compareTo(Neighbour o) {
            return alpha.compareTo(o.alpha);
        }

        Neighbour(int index, double x, double y, Double alpha) {
            this.index = index;
            this.x = x;
            this.y = y;
            this.alpha = alpha;
        }
    }

    private boolean isTriangulation() {
        boolean ok = true;
        /*for (int i = 0; i < n; i++) {
            ArrayList<Neighbour> nb = new ArrayList<Neighbour>();
            for (int j = 0; j < n; j++) {
                if (i != j && m[i][j]) {
                    double alpha = Math.atan2(y[j] - y[i], x[j] - x[i]);
                    nb.add(new Neighbour(j, x[j], y[j], alpha));
                }
            }

            if (nb.size() < 2) {
                ok = false;
                break;
            }

            Neighbour[] nbs = new Neighbour[nb.size()];
            nbs = nb.toArray(nbs);
            Arrays.sort(nbs);

            for (int j = 0; j < nbs.length; j++) {
                int first = nbs[j].index;
                int second = nbs[j == nbs.length - 1 ? 0 : j+1].index;
                if (!m[first][second]) {
                    ok = false;
                    break;
                }
            }
            if (!ok) {
                break;
            }
        }*/
        if (ok) {
            for (int j = 0; j < n; j++) {
                for (int k = j+1; k < n; k++) {
                    for (int q = 0; q < n; q++) {
                        for (int w = q+1; w < n; w++) {
                            if (j != q && j != w && k != q && k != w) {
                                if (m[j][k] && m[q][w]) {
                                    double ax1 = x[j];
                                    double ay1 = y[j];
                                    double ax2 = x[k];
                                    double ay2 = y[k];
                                    double bx1 = x[q];
                                    double by1 = y[q];
                                    double bx2 = x[w];
                                    double by2 = y[w];
                                    double v1 = (bx2-bx1)*(ay1-by1) - (by2-by1)*(ax1-bx1);
                                    double v2 = (bx2-bx1)*(ay2-by1) - (by2-by1)*(ax2-bx1);
                                    double v3 = (ax2-ax1)*(by1-ay1) - (ay2-ay1)*(bx1-ax1);
                                    double v4 = (ax2-ax1)*(by2-ay1) - (ay2-ay1)*(bx2-ax1);
                                    boolean intersect = (v1*v2 < 0) && (v3*v4 < 0);
                                    if (intersect) {
                                        ok = false;
                                        break;
                                    }
                                }
                            }
                        }
                        if (!ok) {
                            break;
                        }
                    }
                    if (!ok) {
                        break;
                    }
                }
                if (!ok) {
                    break;
                }
            }
        }

        return ok;
    }

    class Rebro {
        int i;
        int j;

        Rebro(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }

    Rebro[] Rebros;
    int varCount = 0;
    double min = -1;

    void rec(int need, int count, int start) {
        if (need == 0) {
            if (isTriangulation()) {
                double weight = 0;
                for (int i = 0; i < n; i++) {
                    for (int j = i+1; j < n; j++) {
                        if (m[i][j]) {
                            weight += Math.sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
                        }
                    }
                }
                //pw.println(weight);
                if (min < 0 || weight < min) {
                    min = weight;
                }
            }
            return;
        }

        for (int i = start; i < count; i++) {
            if (!m[Rebros[i].i][Rebros[i].j]) {
                m[Rebros[i].i][Rebros[i].j] = true;
                m[Rebros[i].j][Rebros[i].i] = true;

                rec(need-1, count, i+1);

                m[Rebros[i].i][Rebros[i].j] = false;
                m[Rebros[i].j][Rebros[i].i] = false;
            }
        }
    }

    private void solve() {
        n = ni();
        x = new double[n];
        y = new double[n];
        for (int i = 0; i < n; i++) {
            x[i] = nd();
            y[i] = nd();
        }

        int[] hull = new int[n + 1];
        int k = 0;

        int mini = 0;
        for (int i = 1; i < n; i++) {
            if (x[i] < x[mini]) {
                mini = i;
            }
        }
        hull[k++] = mini;
        while (true) {
            for (int i = 0; i < n; i++) {
                if (i != hull[k-1]) {
                    boolean ok = true;
                    for (int j = 0; j < n; j++) {
                        if (j != hull[k-1] && j != i) {
                            double x1 = x[i] - x[hull[k-1]];
                            double y1 = y[i] - y[hull[k-1]];
                            double x2 = x[j] - x[hull[k-1]];
                            double y2 = y[j] - y[hull[k-1]];
                            double mult = x1*y2 - y1*x2;
                            if (mult > 0) {
                                ok = false;
                                break;
                            }
                        }
                    }
                    if (ok) {
                        hull[k++] = i;
                        break;
                    }
                }
            }
            if (hull[k-1] == hull[0]) {
                k--;
                break;
            }
        }

        m = new boolean[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                m[i][j] = false;
            }
        }

        for (int i = 0; i < k; i++) {
            int j = i+1 == k ? 0 : i+1;
            m[hull[i]][hull[j]] = true;
            m[hull[j]][hull[i]] = true;
        }

        int RebroCnt = k * (k - 3) / 2 + (n - k) * (n - k - 1) / 2 + k * (n - k);
        int needRebros = 3 * n - 3 - k - k;

        Rebros = new Rebro[RebroCnt];

        int q = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i+1; j < n; j++) {
                if (!m[i][j]) {
                    Rebros[q++] = new Rebro(i, j);
                }
            }
        }

        rec(needRebros, RebroCnt, 0);


        pw.printf(Locale.US, "%1.6f", min);
        pw.println();

        /*for (int nx = 3; nx <= 10; nx++) {
            for (int kx = 3; kx <= nx; kx++) {
                long cnt = kx * (kx - 3) / 2 + (nx - kx) * (nx - kx - 1) / 2 + kx * (nx - kx);
                long cnt2 = 3 * nx - 3 - kx - kx;
                BigInteger a = new BigInteger("1");
                for (Integer i = 2; i <= cnt; i++) {
                    a = a.multiply(new BigInteger(i.toString()));
                }
                BigInteger b = new BigInteger("1");
                for (Integer i = 2; i <= cnt - cnt2; i++) {
                    b = b.multiply(new BigInteger(i.toString()));
                }
                BigInteger c = new BigInteger("1");
                for (Integer i = 2; i <= cnt2; i++) {
                    c = c.multiply(new BigInteger(i.toString()));
                }

                a = a.divide(b);
                a = a.divide(c);

                pw.println(nx + " " + kx + " " + cnt + " " + cnt2 + " " + a.toString());

            }

        }*/

        /*Random rand = new Random();
        for (int i = 0; i < 7; i++) {
            pw.println(rand.nextDouble() * 100 + " " + rand.nextDouble() * 100);
        }*/
    }

    void gen() {
        for (int i = 0; i < 12; i++) {
            try {
                PrintWriter pw = new PrintWriter("input" + i + ".txt");

                Random r = new Random();
                int n = r.nextInt(5) + 3;

                pw.println(n);
                for (int j = 0; j < n; j++) {
                    pw.println(r.nextDouble() * 100 + " " + r.nextDouble() * 100);
                }

                pw.close();
            } catch (FileNotFoundException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }
        }
    }

    public void run() {
        //gen();

        /*for (int i = 0; i < 12; i++) {
            try {
                br = new BufferedReader(new FileReader("input" + i + ".txt"));
                pw = new PrintWriter("output" + i + ".txt");
            }
            catch (FileNotFoundException e) {
                throw new RuntimeException("RuntimeException");
            }
            min = -1;*/
            solve();
            pw.close();
        //}
    }

    public static void main(String[] args) {
        /*br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new OutputStreamWriter(System.out));*/

        try {
            br = new BufferedReader(new FileReader("mwt.in"));
            pw = new PrintWriter("mwt.out");
        }
        catch (FileNotFoundException e) {
            throw new RuntimeException("RuntimeException");
        }


        new Thread(new Task13()).start();
    }
}